<%@include file="header.jsp"%>
<c:set var="t" value="true" />
<table class="table table-striped">
	<tr>
		<th>#</th>
		<th><fmt:message key="label.user.name"></fmt:message></th>
		<th><fmt:message key="label.user.phone"></fmt:message></th>
		<th><fmt:message key="label.user.role"></fmt:message></th>
		<th><fmt:message key="label.user.email"></fmt:message></th>
		<th><fmt:message key="label.user.managerid"></fmt:message></th>
		<th>Action</th>
	</tr>
	<c:forEach var="oneUser" items="${users}" varStatus="status">
		<tr>
			<td>${oneUser.userID}</td>
			<td>${oneUser.userName}</td>
			<td>${oneUser.phone}</td>
			<td>${oneUser.role}</td>
			<td>${oneUser.email}</td>
			<td>${oneUser.managerID}</td>
			<td>
				 <c:url var="updurl" scope="page" value="/UpdateUser.jsp">
					<c:param name="userID" value="${oneUser.userID}" />
					<c:param name="username" value="${oneUser.userName}" />
					<c:param name="role" value="${oneUser.role}" />
					<c:param name="email" value="${oneUser.email}" />
					<c:param name="phone" value="${oneUser.phone}" />
					<c:param name="userpassword" value="${oneUser.userPW}" />
					<c:param name="managerid" value="${oneUser.managerID}" />
					<c:param name="update" value="true" />
				</c:url> <c:url var="delurl" scope="page" value="/DeleteUser">
					<c:param name="userID" value="${oneUser.userID}" />
				</c:url>
				<div class="btn-group">
					<button class="btn btn-primary">Action</button>
					<button class="btn btn-primary dropdown-toggle"
						data-toggle="dropdown">
						<span class="caret"></span>
					</button>
					<ul class="dropdown-menu">
						<li><a href="${updurl}"><fmt:message
									key="label.user.edit" /></a></li>
						<li><a href="${delurl}"><fmt:message
									key="label.user.delete" /></a></li>
					</ul>
				</div></td>
		</tr>
	</c:forEach>
</table>
<c:url var="detailurl" scope="page" value="/AddUser.jsp">
	<c:param name="username" value="" />
	<c:param name="role" value="" />
	<c:param name="userpassword" value="" />
	<c:param name="email" value="" />
	<c:param name="phone" value="" />
	<c:param name="managerid" value="" />
</c:url>
<a class="btn btn-primary" href="${detailurl}"><fmt:message
		key="label.user.add" /></a>
<%@include file="footer.jsp"%>